<template>
  <div class="tipModal" v-show="showTip">
    <div class="box">
      <div>{{message}}</div>
      <button type="button" @click="$emit('update:showTip',false)">确 定</button>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
export default {
  props: {
    message: String,
    showTip: {
      type: Boolean,
      default: false
    }
  }
};
</script>

<style lang="less">
.tipModal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);

  .box {
    width: 80%;
    margin: 4rem auto 0;
    background: #fff;
    z-index: 300;
    font-size: 0.36rem;
    text-align: center;
    padding: 0.5rem 0 0.3rem;
    border-radius: 0.12rem;
    letter-spacing: 1px;
  }

  button {
    width: 85%;
    height: 0.8rem;
    display: block;
    background: #65a6f3;
    border-radius: 4px;
    border: none;
    margin: 0 auto;
    font-size: 0.4rem;
    color: #fff;
    margin-top: 0.7rem;
  }
}
</style>
